home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpP_109_Dispatcher < prev    next >
Encoding:
Text File  |  1990-03-23  |  3.3 KB  |  169 lines

  1. { %filename% -- dispatcher for windows and for modeless dialogs }
  2. { Created %date% %time% by AppMaker }
  3.  
  4. Unit %unitname%;
  5. Interface
  6.  
  7. Uses
  8. %if lang = MPW%
  9.     {$Load ToolBox.dump}
  10.         MemTypes,
  11.         QuickDraw,
  12.         OSIntf,
  13.         ToolIntf,
  14.         PackIntf,
  15.     {$Load}
  16.  
  17. %end if%
  18. %if lang = Think%
  19. {$ifc undefined Think_Pascal}
  20.     ListManager,
  21. {$endc}
  22. %end if%
  23.     %for each window gen useswindow%
  24.     %for each dialog gen usesmodeless%
  25.     Globals;
  26.  
  27. {----------}
  28. Procedure OpenWindows (fName:    Str255;
  29.                        vRefNum:    integer;
  30.                        fRefNum:    integer);
  31. Procedure CloseCurWindow;
  32. Procedure MouseInContent (where:        Point;
  33.                           modifiers:    integer);
  34. Procedure TypeInWindow (ch:        char);
  35. Procedure UpdateContent;
  36. Procedure ActivateContent (activate:    boolean);
  37. Procedure ResizeContent;
  38. Procedure ScrollWindow (newValue:    integer;
  39.                         oldValue:    integer);
  40. Procedure DoControl (whichControl:    ControlHandle;
  41.                      whichPart:        integer;
  42.                      where:            Point);
  43.  
  44. Procedure InitModelessDialogs;
  45. Procedure CloseModelessDialog (whichDialog:    DialogPtr);
  46. Function  FilterModeless      (whichDialog:    DialogPtr;
  47.                            var event:        EventRecord;
  48.                            var itemHit:        integer): boolean;
  49. Procedure DoModelessItem      (whichDialog:    DialogPtr;
  50.                                itemNr:        integer);
  51.  
  52. {----------}
  53. Implementation
  54.  
  55. %if lang = MPW%
  56. {$D+}
  57. {$R+}
  58. {$OV+}
  59.  
  60. %end if%
  61. %if lang = MPW%
  62. {$S %unitname%}
  63.  
  64. %end if%
  65. {----------}
  66. Procedure OpenWindows {(fName:        Str255;
  67.                         vRefNum:    integer;
  68.                         fRefNum:    integer)};
  69. Begin
  70.     %for each window gen open%
  71. End; {OpenWindows}
  72.  
  73. {----------}
  74. Procedure CloseCurWindow;
  75. Begin
  76.     case cur^.windowKind of
  77.         %for each window gen close%
  78.     end; {case}
  79. End; {CloseCurWindow}
  80.  
  81. {----------}
  82. Procedure MouseInContent {(where:        Point;
  83.                            modifiers:    integer)};
  84. Begin
  85.     case cur^.windowKind of
  86.         %for each window gen mousein%
  87.     end; {case}
  88. End; {MouseInContent}
  89.  
  90. {----------}
  91. Procedure TypeInWindow {(ch:        char)};
  92. Begin
  93.     case cur^.windowKind of
  94.         %for each window gen typein%
  95.     end; {case}
  96. End; {TypeInWindow}
  97.  
  98. {----------}
  99. Procedure UpdateContent;
  100. Begin
  101.     case cur^.windowKind of
  102.         %for each window gen update%
  103.     end; {case}
  104. End; {UpdateContent}
  105.  
  106. {----------}
  107. Procedure ActivateContent {(activate:    boolean)};
  108. Begin
  109.     case cur^.windowKind of
  110.         %for each window gen activate%
  111.     end; {case}
  112. End; {ActivateContent}
  113.  
  114. {----------}
  115. Procedure ResizeContent;
  116. Begin
  117.     case cur^.windowKind of
  118.         %for each window gen resize%
  119.     end; {case}
  120. End; {ResizeContent}
  121.  
  122. {----------}
  123. Procedure ScrollWindow {(newValue:    integer;
  124.                          oldValue:    integer)};
  125. Begin
  126.     case cur^.windowKind of
  127.         %for each window gen scroll%
  128.     end; {case}
  129. End; {ScrollWindow}
  130.  
  131. {----------}
  132. Procedure DoControl {(whichControl:    ControlHandle;
  133.                       whichPart:    integer;
  134.                       where:        Point)};
  135. Begin
  136.     case cur^.windowKind of
  137.         %for each window gen track%
  138.     end; {case}
  139. End; {DoControl}
  140.  
  141. {----------}
  142. Procedure InitModelessDialogs;
  143. Begin
  144.     %for each dialog gen init%
  145. End; {InitModelessDialogs}
  146.  
  147. {----------}
  148. Procedure CloseModelessDialog {(whichDialog:    DialogPtr)};
  149. Begin
  150.     %for each dialog gen close%
  151. End; {CloseModelessDialog}
  152.  
  153. {----------}
  154. Function FilterModeless {(whichDialog:    DialogPtr;
  155.                       var event:        EventRecord;
  156.                       var itemHit:        integer): boolean};
  157. Begin
  158.     %for each dialog gen filter%
  159. End; {FilterModeless}
  160.  
  161. {----------}
  162. Procedure DoModelessItem {(whichDialog:    DialogPtr;
  163.                            itemNr:        integer)};
  164. Begin
  165.     %for each dialog gen handleitem%
  166. End; {DoModelessItem}
  167.  
  168. End. {%unitname%}
  169.